<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <title>监管系统</title>
    <link rel="shortcut icon"
          href="https://www.aioclinic.com/alioss-proxy/wenuan-oss-public/pc_img/website/logo/qzt_short.ico">
    <link th:href="@{/plugins/css/bootstrap.css(v=${version})} " rel="stylesheet">
    <link th:href="@{/css/weknow.css(v=${version})} " rel="stylesheet">
    <link th:href="@{/css/institutionalInfo.css(v=${version})} " rel="stylesheet">
    <link th:href="@{/css/boxImg.css(v=${version})} " rel="stylesheet">
</head>
<body>
<div class="queryDiv">
    <input type="text" class="nameIpt" placeholder="医疗机构名称" id="institutionalName" maxlength="32">
    <input type="button" id="search" class="btn btn-primary search">
    <input type="button" class="btn btn-primary downTemplate" value="下载模板">
    <input type="button" class="btn btn-primary importInfo" value="导入机构和医生信息">
    <input type="file" id="importExcelFile" style="display:none;" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet">
    <input type="button" class="btn btn-primary addPrescriptionTemplate" value="新增处方模板">
</div>
<div class="dataDiv">
    <table class="table table-condensed table-hover table-bordered" id="dataTable">
        <thead class="bg-default">
        <tr>
            <th class="text-center" style="width:3%;">序号</th>
            <th class="text-center" style="width:15%;">机构名称</th>
            <th class="text-center" style="width:10%;">机构地址</th>
            <th class="text-center" style="width:5%;">负责人</th>
            <th class="text-center" style="width:5%;">联系电话</th>
            <th class="text-center" style="width:5%;">上传处方数</th>
            <th class="text-center" style="width:5%;">违规总数</th>
            <th class="text-center" style="width:5%;">处方模板</th>
            <th class="text-center" style="width:8%;">操作</th>
        </tr>
        </thead>
        <tbody id="tbodyInstitutionalInfoList">

        </tbody>
    </table>
</div>
<div class="pageDiv">
    <div class="upPageDiv">上一页</div>
    <div>
        第
        <select class="pageSelect" id="selectPage">
            <option value="1">1</option>
        </select>
        <input type="hidden" id="pageNum" value="1">
        页
    </div>
    <div class="downPageDiv"><a href="">下一页</a></div>
    <div class="allPage">共1页</div>
    <div>
        <select class="limitSelect" id="pageSize">
            <option value="10">10</option>
            <option value="25">25</option>
            <option value="50">50</option>
            <option value="100">100</option>
        </select>
        条/页
    </div>
</div>

<div class="modal fade" id="addPrescriptionTemplateDiv" tabindex="-1" role="dialog">
    <div class="modal-dialog" style="width: 600px;">
        <div class="modal-content">
            <div class="modal-header" style="height: 50px;">
                <h4 class="modal-title">新增处方模板</h4>
            </div>
            <div class="new-modal-body">
                <label>模板名称：</label>
                <input id="templateName" type="text" class="new-form-control" placeholder="模板名称" maxlength="64">
            </div>
            <div class="new-modal-body">
                <label>模&emsp;板ID：</label>
                <input id="templateSign" type="text" class="new-form-control" placeholder="templateSign">
            </div>
            <div class="new-modal-body">
                <label>模板图片：</label>
                <input id="templatePic" type="file" class="new-form-control" accept="image/*">
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary" id="savePrescriptionTemplate">确认提交</button>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="selectPrescriptionTemplateDiv" tabindex="-1" role="dialog">
    <div class="modal-dialog" style="width: 600px;">
        <div class="modal-content">
            <div class="modal-header" style="height: 50px;">
                <h4 id="selectPrescriptionTemplateH4" class="modal-title">选择模板</h4>
            </div>
            <input type="hidden" id="prescriptionTemplateId">
            <input type="hidden" id="prescriptionTemplateInstitutionId">
            <div class="menu-modal-body">
                <div class="menuDiv">
                    <div th:each="template,userStat:${prescriptionTemplates}"
                         class="menuLi" th:data="${template.id}" th:classid="${template.name}"
                         th:bgcolor="${template.templateSign}"
                         th:value="${template.templatePicUrl}">
                    </div>
                </div>
                <img class="templatePicImg" src="img/authority.png">
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary" id="selectedPrescriptionTemplate">确认提交</button>
            </div>
        </div>
    </div>
</div>


<div class="modal fade" id="selectTemplateForButton" tabindex="-1" role="dialog">
    <div class="modal-dialog" style="width: 600px;">
        <div class="modal-content">
            <div class="modal-header" style="height: 50px;">
                <h4 id="selectTemplateForButtonH4" class="modal-title">选择模板</h4>
            </div>
            <div class="menu-modal-body">
                <div class="menuDiv">
                    <div th:each="template,userStat:${prescriptionTemplates}"
                         class="menuLiForButton" th:data="${template.id}" th:classid="${template.name}"
                         th:bgcolor="${template.templateSign}"
                         th:value="${template.templatePicUrl}">
                    </div>
                </div>
                <img class="templatePicImgForButton" src="img/authority.png">
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" data-dismiss="modal">确认</button>
            </div>
        </div>
    </div>

</body>

<script th:src="@{/js/jquery.min.js(v=${version})}"></script>
<script th:src="@{/js/weknow.js(v=${version})}"></script>
<script th:src="@{/plugins/js/bootstrap.js(v=${version})}"></script>
<script th:src="@{/js/loadCheck.js(v=${version})}"></script>
<script th:src="@{/js/institutionalInfo.js(v=${version})}"></script>
<script th:src="@{/js/showImg.js(v=${version})}"></script>
<!--载入页面时根据code值执行不同逻辑-->
<script th:if="${code}" th:inline="javascript">
    $(document).ready(function () {
        loadCheck([[${code}]], [[${msg}]]);
    });
</script>
</html>
